#ifndef _ROBOT_KUKA_CVIRTUALARM_H_
#define _ROBOT_KUKA_CVIRTUALARM_H_

#include <robot/kuka/ckinematics.h>

#include <buola/scene.h>
#include <buola/scene/transform/crttransform.h>
#include <buola/scene/transform/crevolutionjoint.h>

namespace buola { namespace robot { namespace kuka {

class CVirtualArm
{
public:
    CVirtualArm();
    ~CVirtualArm();

    void SetPose(const robot::kuka::CArmPose &pPose);
    robot::kuka::CArmPose GetPose();

    const scene::PRevolutionJoint& GetJoint(int i)   {   return mJoints[i];  }
    
    void Update();

    scene::PRTTransform GetRootTransform()    {   return mGroup;  }
    scene::PRTTransform GetEndEffector()    {   return mEndEffector;  }

private:
    mutex mMutex;
    scene::PRevolutionJoint mJoints[6];
    scene::PRTTransform mGroup,mEndEffector;
    robot::kuka::CArmPose mPose;
};

/*namespace kuka*/ } /*namespace robot*/ } /*namespace buola*/ }

#endif